import instance from '@/utils/myhttp.js'

function apiChannelData () {
  return instance({
    url: '/app/v1_0/user/channels',
    method: 'get'
  })
}

// 所有频道
function apiAllChannel () {
  return instance({
    url: '/app/v1_0/channels',
    method: 'get'
  })
}

// 设置
function processChannel (channels) {
  return instance({
    url: '/app/v1_0/user/channels',
    method: 'put',
    data: {
      channels: channels
    }
  })
}

export { apiChannelData, apiAllChannel, processChannel }
